import pandas as pd
import os

# 定义文件路径
working_directory = '/Users/linda/myprojects/gitee/MoneyDoubleSignal/2025-7-18最优/'
turnover_file = os.path.join(working_directory, 'df_turnover.csv')

# 读取数据
df = pd.read_csv(turnover_file)

# 计算平均换手率
# 确保列名正确
if '换手率(Turnover)' in df.columns:
    average_turnover = df['换手率(Turnover)'].mean()
    print(f"总体的平均每日换手率是: {average_turnover:.4f}")
else:
    print("错误：在文件中未找到 '换手率(Turnover)' 列。")
